package Phone;

import java.util.*;

public class Phone{
   private String _model;
   private ArrayList<EProperty> _props;

   public Phone(String model,ArrayList<EProperty> props){

       this._model=model;
       this._props=(ArrayList)props.clone();
   }

   public String getName(){
       return this._model;
   }

   public boolean hasProp(EProperty prop){
       return this._props.contains(prop);
   }
   
   public void PrintOut(){
	   System.out.println("Model:\n" + _model);
	   Iterator<EProperty> iterator = _props.iterator();
	   System.out.println("Wlasciwosci:");
	   while(iterator.hasNext()){
		   EProperty prop = iterator.next();
		   System.out.println(prop.name());
	   }
	   System.out.println("");
   }
}